package com.artifex.mupdf.viewer.app

import android.app.Application
import timber.log.Timber

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()

        // Set default uncaught exception handler
        Thread.setDefaultUncaughtExceptionHandler { thread, throwable ->
            Timber.e(throwable, "Uncaught exception in thread ${thread.name}")
            // This will trigger our CrashReportingTree
            // The system will still kill the process after this
        }

//        if (BuildConfig.DEBUG) {
//            Timber.plant(Timber.DebugTree()) // Plant debug tree for debug builds
//        } else {
//
//        }
        // Plant your release tree here (see advanced setup below)
        Timber.plant(CrashReportingTree(this))
    }
}